
//
//  LeaveMainViewController.m
//  OAProject
//
//  Created by yhj on 2017/2/22.
//  Copyright © 2017年 cdnunion. All rights reserved.
//

#import "LeaveMainViewController.h"
#import "NotLeaveViewController.h"
#import "DoneLeaveViewController.h"

@interface LeaveMainViewController ()

@end

@implementation LeaveMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    // 初始化样式
    [self initView];

    // 添加子控制器
    [self addChildVC];

    self.title=@"请假";

}

// 初始化样式
-(void)initView
{
    // 设置标题栏样式
    [self setUpTitleEffect:^(UIColor *__autoreleasing *titleScrollViewColor, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor, UIFont *__autoreleasing *titleFont, CGFloat *titleHeight, CGFloat *titleWidth)
     {
         *titleScrollViewColor=[UIColor whiteColor];
         *norColor=BlackColor;
         *selColor=HexRGB(0x1E90FF);
         *titleWidth=APPW/2;
     }];

    // 设置下标
    [self setUpUnderLineEffect:^(BOOL *isUnderLineDelayScroll, CGFloat *underLineH, UIColor *__autoreleasing *underLineColor, BOOL *isUnderLineEqualTitleWidth) {
        *isUnderLineDelayScroll=YES;
        *underLineColor=HexRGB(0x1E90FF);
    }];
}

// 添加子控制器
-(void)addChildVC
{
    // 未审批
    NotLeaveViewController *notLeaveViewController=[NotLeaveViewController new];
    notLeaveViewController.title=@"未审批";
    [self addChildViewController:notLeaveViewController];

    // 已审批
    DoneLeaveViewController *doneLeaveViewController=[DoneLeaveViewController new];
    doneLeaveViewController.title=@"已审批";
    [self addChildViewController:doneLeaveViewController];
    
}


@end
